$webwork.htmlEncode($page.space.name) : Maven Build Reference
This page last changed on May 10, 2007 by jdeolive.
The Maven Quickstart had one goal - to get you something on screen starting with only the source code. But there is a lot more you can do with our build environment
Compiling a Single ModuleTo build a single module:
[/dev/geoserver/main]% mvn compile
Building a Single ModuleFrom the root of the module: [/dev/geoserver/main]% mvn install Web Module and "Configurations"Several configurations for GeoServer are available here:
1 Command Line System PropertiesThe configId and configDirectory can be specified on the command line when building the web module: [/dev/geoserver/web]% mvn install -DconfigDirectory=/home/bob/geoserver/configuration -DconfigId=citewfs 2 Environment VariablesThe properties may also be specified as environment variables on your system. See documentation for setting environment variables for your system. Example with a linux bash shell: [/dev/geoserver/main]% export configDirectory=/home/bob/geoserver/configuration [/dev/geoserver/main]% export configId=citewfs [/dev/geoserver/main]% mvn clean install 3 Maven settings.xmlRepeatedly specifying these properties as command line parameters can get tiresome. A good alternative is to place them in your maven settings.xml file, located in <home directory>/.m2/settings.xml: settings.xml <settings>
...
<profiles>
<profile>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<configDirectory>/home/bob/geoserver/configuration</configDirectory>
<configId>citewfs</configId>
</properties>
</profile>
</profiles>
...
</settings>
4 Web Module pom.xmlYou may also edit the properties directory in the web pom.xml file, in the properties section located near the end of the pom: pom.xml ... <properties> <configDirectory>/home/bob/geoserver/configuration</configDirectory> <configId>citewfs</configId> </properties> </project> This method is not recommended as you risk committing information specific to your local environment. Building a Module Without Running TestsYou should always run the tests, but you may want to occasionally not run them. To do that use the following command: mvn -Dmaven.test.skip=true install
Jetty RunTo Use Another PortTo start up jetty on another port you can modify add a connectors section to your pom.xml file: <configuration> <contextPath>geoserver</contextPath> <connectors> <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> <port>80</port> <maxIdleTime>10000</maxIdleTime> </connector> </connectors> .... Build-Run WorkflowIn general, when you make a code change to a module in your development environment you must:
As an example, if you make a change to the wfs module: [/dev/geoserver]% cd wfs [/dev/geoserver/wfs]% mvn install [/dev/geoserver/wfs]% cd ../web [/dev/geoserver/web]% mvn jetty:run
Javadoc generationFrom the root of the geoserver source tree: [/dev/geoserver]% mvn javadoc:javadoc will generate a complete javadoc or all geoserver modules into {{/dev/geoserver/target/site/apidocs}. You may also want to generate javadocs with embedded UML class diagrams. These are generated using
Once prerequisites are satisfied, you can generate the docs with UML diagrams embedded running: [/dev/geoserver]% mvn javadoc:javadoc -Duml |
Document generated by Confluence on Jan 16, 2008 23:26 |